<template>
    <div class="sjplatformAdd">
        <el-form label-width="100px">
            <el-form-item label="名称：">
                <el-input v-model="flowStore.flowTypeModel.typeName" />
            </el-form-item>
            <el-form-item label="上级类型：">
                <el-tree-select v-model="flowStore.flowTypeModel.pName" :data="flowTypeTree"
                    check-strictly :render-after-expand="false" @node-click="handleNodeClick" placeholder="请选择..." />
            </el-form-item>
        </el-form>
    </div>
</template>

<script lang="ts" setup>
import { useFlowTypeTable } from '../../hooks/FlowManager/useFlowTypeTable';
let { flowTypeTree, flowStore, getFlowTypeTree } =
    useFlowTypeTable(1, 10);
getFlowTypeTree();

function handleNodeClick(node) {
    flowStore.flowTypeModel.pid = node.id;
    flowStore.flowTypeModel.pName = node.label;
};
</script>